home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / program / ddj0897.zip / DYN401.ZIP / kernel / jumpto / jumpto.w90 < prev    next >
Text File  |  1995-08-08  |  811b  |  41 lines

  1.  
  2. /*  This routine works with WATCOM-C/386 version 9.0
  3.     (See other jumpto.w* files for other configurations)
  4.     It uses the stack parameter passing convention (used by NLMs) and
  5.     no stack checking
  6.     compile with:
  7.         wcl386 -4s -c -I../include -zp2 -zq -oilrt -s file.c
  8. */
  9.  
  10.  
  11.  
  12. typedef int     (*fun)();
  13.  
  14. void DB(void);
  15. void NDB(void);
  16.  
  17. #pragma aux DB = "add esp,14H" \
  18.                     "pop eax" \
  19.                     "pop ebp" \
  20.                     "add esp,0CH" \
  21.                     "jmp eax"
  22.  
  23. #pragma aux NDB = "add esp,8H" \
  24.                     "pop eax" \
  25.                     "pop ebp" \
  26.                     "jmp eax"
  27.  
  28.  
  29. void    _jumpToMethod( f )
  30. fun     f;
  31. {
  32.  
  33. /*      pop_this_stack_frame;   */
  34.  
  35. /*      pop previous (generics) stack frame  */
  36.  
  37.    NDB();
  38.  
  39. }
  40.  
  41.